<template>
  <basic-container>
    <avue-crud v-bind="bindVal"
               v-on="onEvent"
               :page.sync="page"
               v-model="startForm">
      <template slot-scope="{type,size,row}" slot="menu">
        <el-button icon="el-icon-check" v-if="getBtnPermission('delRoleDataRuleBtn',row,null,false)"
                   @click="handlerPermission(row)" :size="size" :type="type">权限
        </el-button>
      </template>
    </avue-crud>
    <editor-permission-dialog ref="editorPermissionDialog"></editor-permission-dialog>
  </basic-container>
</template>

<script>

import startCrud from "@/mixins/start-crud.js"
import EditorPermissionDialog from "./EditorPermissionDialog"

export default startCrud({
  name: "index",
  components: {
    EditorPermissionDialog
  },

  methods: {
    handlerPermission(row) {
      this.$refs.editorPermissionDialog.show(row)
    },
  }
}, {
  name: "sys/role",
  isTreeData:true,
})
</script>

<style scoped>

</style>
